// MeshOrthographic.h provides the attributes included in a MeshOrthographic class
//-----------------

#if !defined( MeshOrthographicH)
#define MeshOrthographicH

//-----------------
// Includes libraries and other files
#include <cassert>	// for asserts
#include <d3dx9.h>	// DirectX 3D library
#include <string>

#include "constants.h"
//-----------------

class MeshOrthographic {
	public:
		// constructor and destructor
		MeshOrthographic();
		~MeshOrthographic();

		// accessors
		void render( LPDIRECT3DTEXTURE9 texture, float tx, float ty, float tz, float sx, float sy, float sz, float rx, float ry, float rz, const int& o) const;
		void render( LPDIRECT3DTEXTURE9 texture, float tx, float ty, float tz, float sx, float sy, float sz, const int& o) const;
		void render( LPDIRECT3DTEXTURE9 texture, float x, float y, float z, const int& o) const;

		// mutator
		HRESULT setup( LPDIRECT3DDEVICE9 device);

	private:
		void render( LPDIRECT3DTEXTURE9 texture, const int& opacity) const;

		// A structure for our custom vertex type
		struct CUSTOM_VERTEX {
			D3DXVECTOR3 position;	// Position
			FLOAT u, v;				// Texture co-ordinates.
		};

		// The structure of a vertex in our vertex buffer...
		#define D3DFVF_CUSTOM_VERTEX (D3DFVF_XYZ | D3DFVF_TEX1)


		LPDIRECT3DDEVICE9		device_;
		LPDIRECT3DVERTEXBUFFER9 vertex_buffer; // Buffer to hold vertices for the rectangle
		bool needs_releasing_;
};

#endif